package javango.contrib.servlet;

import javax.servlet.http.HttpServletRequest;

import javango.contrib.sessions.Session;

public class HttpServletSession extends Session {

	HttpServletRequest request;
	
	public HttpServletSession(HttpServletRequest request) {
		this.request = request;
	}
	
	@Override
	public void clear(String key) {
		request.getSession().removeAttribute(key);
	}

	@Override
	public Object get(String key) {
		return request.getSession().getAttribute(key);
	}

	@Override
	public void put(String key, Object value) {
		request.getSession().setAttribute(key, value);
	}

}
